<?php

namespace app\middleware;

use \ltcms\middleware\Middleware_contract;

class webStatus implements Middleware_contract
{
    /**
     *  处理请求
     */
    public function handle($request, \Closure $next)
    {    //检测网站是否关闭
        $siteSwitch=siteSetting("siteSwitch")?siteSetting("siteSwitch"):"";
        switch ($siteSwitch) {
            case "2":
                return view("error/websiteShutdown");
                break;
            case "":
                break;
        }
        $response = $next($request);
        return $response;
    }
}


